<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="taglibs.jsp"%>
<%@ include file="RolePowerManager.jsp"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <link rel="stylesheet" href="${ctx}/css/common.css" type="text/css"></link>
  <link rel="stylesheet" href="${ctx}/css/reset.css" type="text/css"></link>
  <link rel="stylesheet" href="${ctx}/css/Train/floatdiv.css" type="text/css"></link>
  <link rel="stylesheet" href="${ctx}/css/Train/TrainTypeManager.css" type="text/css"></link>
  <script type="text/javascript" src="${ctx}/js/jquery-1.7.2.js"></script>
   <script type="text/javascript" src="${ctx}/js/jquery.easydrag.handler.beta2.js"></script>
  <script type="text/javascript" src="${ctx}/js/Train/TrainTypeManager.js"  charset="UTF-8"></script>
  <script type='text/javascript' src='${ctx}/dwr/interface/TrainTypeManager.js'></script>
	<script type='text/javascript' src='${ctx}/dwr/engine.js'></script>
	<script type='text/javascript' src='${ctx}/dwr/util.js'></script>
  </head>
  
  <body>
    	  <div class="head">
  		<div class="curloc"><span>当前位置: 教育培训 >> 培训类型维护</span></div>
  	  </div>
       <div style="float: right; padding-right: 20px">
	  			<span class="STYLE1"><img src="${ctx}/images/001.gif" width="9" height="9" /></span>
            	<span class="STYLE1"> </span><a href="#" onclick="popadd()">新增</a><span class="STYLE1"></span>
	  	</div>
	  <div class="clear"> </div>
  <div id="main">
    <table id="detail_t">
    	<tr>
    		<th>序号</th>
    		<th>类别编号</th>
    		<th>培训类别</th>
    		<th>更多操作</th>
    	</tr>
    	    <c:forEach items="${page.list}" var="ty" varStatus="stat">
    <tr>
    	<td>${stat.count }</td>
    	<td>${ty.id}</td>
    	<td>${ty.typename}</td>
    	<td>
    	<div align="center">
            <span class="STYLE1"><img src="${ctx}/images/037.gif" width="9" height="9" /></span>
            <span class="STYLE1"> [</span><a href="#" onclick="updatetype(${ty.id })">详情/修改</a><span class="STYLE1">]</span>
            &nbsp;&nbsp;&nbsp;
            <span class="STYLE2"><img src="${ctx}/images/010.gif" width="9" height="9" /></span>
            <span class="STYLE2"> </span><span class="STYLE1">[</span><a href="#" onclick="deleteTrainType(${ty.id })">删除</a><span class="STYLE1">]</span>
            </div>
    	</td>
    </tr>
    </c:forEach>
    </table>
          <div class="manu">共${page.totalCount}条记录当前第<font color="#ff6600">${page.pageNo}/${page.pageCount}</font>页
				 <a href="GetTrainType?pageNo=${1}">首页</a>
				  <a href="GetTrainType?pageNo=${page.pageNo-1}">上一页</a>
				  <a href="GetTrainType?pageNo=${page.pageNo+1}">下一页</a>
				  <a href="GetTrainType?pageNo=${page.pageCount}">末页</a> 每页显示
				  <input type="text" name="pageSize"  id="pageSize" size="4"/>条
				  <input type="submit" value="提交" class="submitbuttton" onclick="changePageSize()"/> 
			</div>
		</div>   
    
    
    <div id="AddTrainType_div">
	<div class="div_head" id="AddTrainType_head">
    <span class="div_title">添加培训类型</span>
    <span><a class="div_close" onclick="hideDiv('AddTrainType_div');" title="close">X</a></span>
    </div>
    <div id="AddTrainType_body" >
    <table id="detail_t" width="100%">
    <tr>
   		<td> 类型名称：</td>
   		<td><input type="text" name="name" id="typename"></td>
    </tr>
    <tr>
   		<td colspan="2">
   			<span style="float: right;margin-right: 20px;" class="btn">
   				<input type="button"  onclick='addTrainType()'  value="添加">
   			</span>
   		</td>
    </tr>
    </table>
    </div>
    </div>
    
	<div id="UpdateTrainType_div">
	<div class="div_head" id="UpdateTrainType_head">
    <span class="div_title">修改培训类型</span>
    <span><a class="div_close" onclick="hideDiv('UpdateTrainType_div');" title="close">X</a></span>
    </div>
    <div id="UpdateTrainType_body" >
    <table id="detail_t" width="100%">
     <tr>
   		<td> 类型编号：<input type="hidden" id="TypeId" value=""/></td>
   		<td id="TrainTypeId"></td>
    </tr>
    <tr>
   		<td> 类型名称：</td>
   		<td><input type="text" name="name" id="traintypename"></td>
    </tr>
    <tr>
   		<td colspan="2">
   			<span style="float: right;margin-right: 20px;" class="btn">
   				<input type="button"  onclick='updateTrainType()' value="修改">
   			</span>
   		</td>
    </tr>
    </table>
    </div>
    </div>
</div>
  </body>
</html>
